<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <button class="btn">点击打开新窗口</button>
    <script>
        location.href = 'file:///E:/H5/JS%20%E5%A4%8D%E4%B9%A0/ComDay04-BOM02.html?username=jack#12345';
        console.log(window.location);
        //获取完整路径
        console.log(location.href);
        //页面传值信息 : ?后面的内容
        console.log(location.search);
        //页面 hash值 #后面的内容
        console.log(location.hash);
    </script>
</body>

</html>